package com.gears_software.sxdc.dccx.ui.view;

import android.content.Context;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.gears_software.sxdc.dccx.R;
import com.gears_software.sxdc.dccx.data.model.NoticeModel;

import org.androidannotations.annotations.EViewGroup;
import org.androidannotations.annotations.ViewById;

/**
 * Created by chezhenzhen on 2017/10/17.
 */

@EViewGroup(R.layout.item_view_messagecenter)
public class MessageCenterItemView extends LinearLayout {
    @ViewById
    TextView txt_title;
    @ViewById
    TextView txt_content;
    @ViewById
    TextView txt_date;
    Context context;

    public MessageCenterItemView(Context context) {
        super(context);
        this.context = context;
    }

    public void bind(NoticeModel noticeModel) {
        if (noticeModel != null) {
            txt_title.setText(noticeModel.getTitle());
            txt_content.setText(noticeModel.getContent());
            txt_date.setText(noticeModel.getCreateDate());
        }
    }
}
